package com.beta.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.beta.service.IOrderSettleQueuesService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by vector on 2016/12/23.
 */
public class OrderSettleJob implements SimpleJob {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private IOrderSettleQueuesService settledQueuesService;

    @Override
    public void execute(ShardingContext shardingContext) {

        logger.info("订单结算任务 - start...");

        settledQueuesService.executeSettleAll();

        logger.info("订单结算任务 - end...");

    }

}
